<template>
  <div class="root" v-loading="Rootloading">
    <div class="background">
      <div class="text">
        <i
        v-if="http.indexOf('dkaq') == -1"
          class="el-icon-arrow-left"
          @click="
            () => {
              this.$router.push('/');
            }
          "
        >
          返回首页
        </i>
        在线报名
        <el-button class="button" type="primary" @click="login">立即登录</el-button>
      </div>
      <div class="content">
        <el-form label-position="left" label-width="150px" :model="formLabelAlign" v-loading="loading">
          <el-form-item required label="注意事项" v-if="(platformAnhui() || platform('qiye'))">
            <el-button type="primary" @click="writeName('注意事项', null)" v-if="!autographPath4">签名</el-button>
            <img v-else :src="autographPath4" alt="" style="width: 120px; height: 60px; cursor: pointer" @click="writeName('注意事项', null)" />
            <span style="margin-left: 50px; cursor: pointer; color: red" @click="openBookshixiang">阅读注意事项</span>
          </el-form-item>
          <div v-if="(http.indexOf('taihua') == -1 && http.indexOf('zaah') == -1) || (http.indexOf('taihua') != -1 && formLabelAlign.gz != '学历提升')">
            <van-field
              clickable
              name="picker"
              :value="formLabelAlign.gz"
              :is-link="true"
              label="培训大类"
              placeholder="请选择"
              @click="showPicker = true"
              label-class="lablesClass"
              :readonly="true"
            />

            <van-popup v-model="showPicker" position="bottom" style="height: 55vh;">
              <van-picker show-toolbar :columns="GZList" @confirm="onConfirm" @cancel="showPicker = false" />
            </van-popup>
          </div>

          <el-form-item label="培训大类" required v-else-if="http.indexOf('zaah') == -1">
            <el-select style="width: 100%" v-model="formLabelAlign.gz" placeholder="请选择" @change="gzChange">
              <el-option v-for="item in GZList" :key="item" :label="item" :value="item"> </el-option>
            </el-select>
          </el-form-item>
          <div v-if="(http.indexOf('bbxdf') != -1 || http.indexOf('testtjy') != -1) && (formLabelAlign.gz == '一般工贸' || formLabelAlign.gz == '安全管理')">
            <van-field v-model="formLabelAlign.extra.CNPtype" is-link readonly label="公司类型" placeholder="请选择公司类型" @click="showCompanyType = true" />
            <van-popup v-model="showCompanyType" position="bottom" style="height: 55vh;">
              <van-picker title="公司类型" show-toolbar :columns="typeList" @confirm="finshType" @cancel="showCompanyType = false" />
            </van-popup>
            <van-field v-model="formLabelAlign.extra.address" is-link readonly label="所在地域" placeholder="请选择所在地域" @click="showAddress = true" />
            <van-popup v-model="showAddress" position="bottom" style="height: 55vh;">
              <van-picker title="所在地域" show-toolbar :columns="addressList" @confirm="finshAddress" @cancel="showAddress = false" />
            </van-popup>
          </div>
          
          <!-- <el-form-item 
                    :label="item.label" 
                    v-for="item in fromList" 
                    :key="item.id"
                    :required='Boolean(item.selected)' 
                    > -->
          <div v-if="http.indexOf('taihua') == -1 || (http.indexOf('taihua') != -1 && formLabelAlign.gz != '学历提升')">
            <van-popup v-model="showCascader" position="bottom" style="height: 55vh;">
              <!-- ==========洛阳机车 特种作业 学历时间========================================= -->
              <van-datetime-picker
                v-model="xueli_time"
                :show-toolbar="formLabelAlign.isShow == '学历开始时间'"
                type="date"
                title="选择学历开始时间"
                v-if="formLabelAlign.isShow == '学历开始时间'"
                :min-date="minDate"
                @confirm="pickConfirm"
                @cancel="showCascader = false"
              />
              <van-datetime-picker
                v-model="xueli_time"
                :show-toolbar="formLabelAlign.isShow == '学历结束时间'"
                type="date"
                :min-date="minDate"
                title="选择学历开始时间"
                v-if="formLabelAlign.isShow == '学历结束时间'"
                @confirm="pickConfirm"
                @cancel="showCascader = false"
              />
              <!-- ==========洛阳机车 特种作业 工作时间========================================= -->
              <van-datetime-picker
                v-model="xueli_time"
                :show-toolbar="formLabelAlign.isShow == '工作开始时间'"
                type="date"
                title="选择工作开始时间"
                v-if="formLabelAlign.isShow == '工作开始时间'"
                :min-date="minDate"
                @confirm="pickConfirm"
                @cancel="showCascader = false"
              />
              <van-datetime-picker
                v-model="xueli_time"
                :show-toolbar="formLabelAlign.isShow == '工作结束时间'"
                type="date"
                :min-date="minDate"
                title="选择工作结束时间"
                v-if="formLabelAlign.isShow == '工作结束时间'"
                @confirm="pickConfirm"
                @cancel="showCascader = false"
                
              />
              <!-- ====================================================== -->

              <van-cascader
                v-if="formLabelAlign.isShow == 'subject_id'"
                v-model="Cascadervalue"
                style="width: 100%;height:100%;"
                :options="subjectListTree"
                placeholder="请选择培训科目"
                @close="showCascader = false"
                :field-names="{
                  text: 'title',
                  value: 'id',
                  children: 'children',
                }"
                @finish="subChange"
              />
              <van-datetime-picker v-if="formLabelAlign.isShow == 'qzsj'" type="date" title="选择年月日" @confirm="pickConfirm" @cancel="showCascader = false" />
              <van-cascader
                v-if="formLabelAlign.isShow == 'region_id'"
                v-model="Cascadervalue"
                style="width: 100%;height: 100%;"
                :options="pakeHotl"
                placeholder="请选择工作地点"
                @close="showCascader = false"
                :field-names="{
                  text: 'region_name',
                  value: 'region_id',
                  children: 'children',
                }"
                @finish="HotFinish"
                @change="HotChange"
              />

              <van-picker
                v-if="formLabelAlign.isShow != 'subject_id' && formLabelAlign.isShow != 'region_id' && formLabelAlign.isShow != 'qzsj'"
                :show-toolbar="
                  formLabelAlign.isShow != '学历开始时间' &&
                  formLabelAlign.isShow != '学历结束时间' &&
                  formLabelAlign.isShow != '工作开始时间' &&
                  formLabelAlign.isShow != '工作结束时间'
                "
                :columns="formLabelAlign.options"
                @confirm="InputConfirm"
                @cancel="showCascader = false"
              />
            </van-popup>
            <div v-for="item in fromList" :key="item.id" style="position: relative">
              <span
                v-if="item.field_type != 'img' && item.field_type != 'json' && item.hint"
                style="color: red; line-height: 20px !important; width: 60%; display: block; position: absolute; z-index: 10; right: 0"
                >{{ item.hint }}</span
              >
              <van-field
                v-model="item.placeholder"
                :required="Boolean(item.selected)"
                :is-link="item.field_type != 'input' && item.field_type != 'number' && item.field_type != 'textarea'"
                :label="item.field_type == 'json' ? '' : item.label"
                :readonly="item.field_type != 'input' && item.field_type != 'number' && item.field_type != 'textarea'"
                @click="vanClick(item)"
                v-show="item.passShow"
                @input="inputChange(item)"
                label-class="lablesClass"
                :class="item.hint ? 'vant catie' : 'vant'"
                v-if="
                  (item.field_type != 'img' &&
                    item.field_type != 'json' &&
                    item.passShow &&
                    item.field_type != 'autowrite' &&
                    item.field_type != 'textarea' &&
                    ((http.indexOf('testtjy') == -1 && item.label != '学历起止时间' && item.label != '学习工作经历') ||
                      (http.indexOf('lyjc') == -1 && item.label != '学历起止时间' && item.label != '学习工作经历'))) ||
                  (item.label != '培训科目' && http.indexOf('zaah') != -1)
                "
              >
              <!-- <template #button v-if="item.label=='身份证号'&&photoApply">
                <div @click.stop="()=>{
                  setOptions = {
                    style:{
                    },
                    clip:1.58,
                    msgs:[
                      '1. 请拍摄或在相册中选择身份证头像面图片',
                      '2. 证件信息必须无遮挡且清晰不模糊。',
                      '3. 照片请勿上下、左右倒置或翻转；'
                    ],
                    field_id:'id_card_photo'
                  }
                  showcamera=true
                }" style="padding: 4px 12px;font-size: 14px;background-color: #409EFF;color: #fff;">拍照</div>
              </template> -->
              </van-field>
              <!--===============洛阳机车特种作业 学历起止时间分开==============================================-->

              <van-field
                v-model="xueli_starttime"
                :required="Boolean(item.selected)"
                :is-link="item.field_type != 'number' && item.field_type != 'textarea'"
                label="学历开始时间"
                :readonly="item.field_type != 'number' && item.field_type != 'textarea'"
                @click="vanClick(item, 'start')"
                @input="inputChange(item)"
                v-if="
                  item.field_type != 'img' &&
                  item.field_type != 'json' &&
                  item.passShow &&
                  item.field_type != 'autowrite' &&
                  item.field_type != 'textarea' &&
                  ((http.indexOf('testtjy') != -1 && item.label == '学历起止时间') ||
                    item.label == '学习工作经历' ||
                    (http.indexOf('lyjc') != -1 && item.label == '学历起止时间') ||
                    item.label == '学习工作经历')
                "
                label-class="lablesClass"
                :class="item.hint ? 'vant catie' : 'vant'"
              >
              </van-field>
              <van-field
                v-model="xueli_endtime"
                :required="Boolean(item.selected)"
                :is-link="item.field_type != 'number' && item.field_type != 'textarea'"
                label="学历结束时间"
                :readonly="item.field_type != 'number' && item.field_type != 'textarea'"
                @click="vanClick(item, 'end')"
                @input="inputChange(item)"
                v-if="
                  item.field_type != 'img' &&
                  item.field_type != 'json' &&
                  item.passShow &&
                  item.field_type != 'autowrite' &&
                  item.field_type != 'textarea' &&
                  ((http.indexOf('testtjy') != -1 && item.label == '学历起止时间') ||
                    item.label == '学习工作经历' ||
                    (http.indexOf('lyjc') != -1 && item.label == '学历起止时间') ||
                    item.label == '学习工作经历')
                "
                label-class="lablesClass"
                :class="item.hint ? 'vant catie' : 'vant'"
              >
              </van-field>
              <!--===============洛阳机车特种作业 工作学习时间分开==============================================-->

              <van-field
                v-model="work_starttime"
                :required="Boolean(item.selected)"
                :is-link="item.field_type != 'number'"
                label="工作开始时间"
                :readonly="item.field_type != 'number' && item.field_type != 'textarea'"
                @click="vanClick(item, 'workstart')"
                @input="inputChange(item)"
                v-if="item.field_type == 'textarea' && formLabelAlign.gz == '特种作业' && http.indexOf('lyjc') != -1 && item.label == '学习工作经历'"
                label-class="lablesClass"
                :class="item.hint ? 'vant catie' : 'vant'"
              >
              </van-field>
              <van-field
                v-model="work_endtime"
                :required="Boolean(item.selected)"
                :is-link="item.field_type != 'number'"
                label="工作结束时间"
                readonly
                v-if="item.field_type == 'textarea' && formLabelAlign.gz == '特种作业' && http.indexOf('lyjc') != -1 && item.label == '学习工作经历'"
                label-class="lablesClass"
                :class="item.hint ? 'vant catie' : 'vant'"
              >
              </van-field>
              <!-- =============endendend============================================= -->
              <van-field
                v-model="item.placeholder"
                :required="Boolean(item.selected)"
                :label="item.label"
                @click="vanClick(item)"
                @input="inputChange(item)"
                type="textarea"
                v-else-if="item.field_type == 'textarea'&&item.passShow"
                :maxlength="120"
                :show-word-limit="true"
                :autosize="true"
                :clearable="true"
                :class="item.hint ? 'catie' : ''"
                label-class="lablesClass"
              >
              </van-field>
              <div v-if="item.field_type == 'json'" v-show="item.passShow">
                <van-field
                  v-model="JsonListFrom[it.label]"
                  :label="it.label"
                  v-for="(it, index) in JSON.parse(item.options)"
                  :key="index"
                  @input="inputChange(item)"
                  :required="Boolean(item.selected)"
                  label-class="lablesClass"
                  :class="item.hint ? 'catie' : ''"
                >
                </van-field>
              </div>
              
            </div>
            <div v-if="platformAnhui() || http.indexOf('qiye') != -1">
              <van-field v-model="formLabelAlign.extra.企业性质" is-link readonly required label="企业性质" placeholder="请选择公司类型" @click="showexType = true" />
              <van-popup v-model="showexType" position="bottom" style="height: 55vh;">
                <van-picker
                  title="企业性质"
                  v-if="formLabelAlign.gz == '特种作业'"
                  show-toolbar
                  :columns="['国企', '私企', '个人']"
                  @confirm="finshwxType"
                  @cancel="showexType = false"
                  
                />
                <van-picker title="企业性质" v-else show-toolbar :columns="['国企', '私企']" @confirm="finshwxType" @cancel="showexType = false" />
              </van-popup>
            </div>
            <div v-if="http.indexOf('bosheng') != -1&&formLabelAlign.gz=='燃气从业人员培训'">
              <van-field v-model="deptitle" is-link readonly required label="燃气主管部门" placeholder="请选择部门" @click="showdepbox = true" />
              <van-popup v-model="showdepbox" position="bottom" style="height: 55vh;">
                <van-cascader
                  v-model="Cascadervalue"
                  title="请选择部门"
                  :options="depList"
                  @close="showdepbox = false"
                  @finish="depFinish"
                  :field-names="{
                    text:'title',
                    value:'id',
                  }"
                />
              </van-popup>
            </div>
          </div>
          <div v-else>
            <Taihua ref="taihua" :gz="formLabelAlign.gz"></Taihua>
          </div>
          <div v-if="platform('hzdpx') || this.platform('xtaq') || (platform('zcaq') && formLabelAlign.gz == '大培训')">
            <van-field v-model="codeChk" :required="true" label="验证码" :maxlength="120" label-class="lablesClass">
              <template slot="button">
                <van-button style="display: flex; margin: 0" size="mini" type="info" @click="hoveCode" v-if="hascodeYes">发送验证码</van-button>
                <!--   v-else <van-button size="mini" type="info" @click="hoveCode" v-if="hascodeYes">发送验证码</van-button> -->
                <div v-else style="height: 100%; width: 70px; display: flex; align-items: center; justify-content: center; color: #000">{{ codeTime }}s</div>
              </template>
            </van-field>
          </div>
          <div v-if="http.indexOf('taihua') == -1 || (http.indexOf('taihua') != -1 && formLabelAlign.gz != '学历提升')">
            <el-form-item :label="item.label" v-for="item in fromList" :key="item.id + 10000" :required="Boolean(item.selected)" v-show="item.field_type == 'img' && item.passShow">
              <!-- <span v-if="item.field_id == 'photo' && http.indexOf('lyky') != -1" style="color: red; line-height: 20px !important"
                >必须上传白底照片，白底照片可以在在线照相模块完成</span
              > -->
              <div v-if="item.hint" style="color: red; line-height: 20px !important;background-color: rgba(210, 69, 72, 0.06);padding: 5px;">{{ item.hint }}</div>
              <div style="display: flex;align-items: center;">
                <!-- v-show="formLabelAlign[item.field_id]" -->
                <upload
                  action="/admin/MemberApply/upload"
                  accept="image/*"
                  :data="{ field: item.field_id }"
                  :fileList="item.fileList"
                  :plain="false"
                  @change="upChange($event, item.field_id)"
                  @remove="remove(item.field_id)"
                  @PictureCard="PictureCard(item, $event)"
                  :ref="'img' + item.field_id"
                  :PictureEditBackIf="setting.backgroundPhoto&&setting.backgroundPhoto=='是'&&item.field_id=='photo'"
                  @PictureEditBack="PictureEditBack(item, $event)"
                />
                <!-- <div v-show="!formLabelAlign[item.field_id]" style="display: flex;align-items: center;justify-content: center;width: 148px;height:148px;border:1px #ddd dashed ;border-radius: 8px;">
                  <div @click.stop="openCorme(item)" style="font-size: 14px;background-color: #409EFF;color: #fff;width:58px;height:32px;display: flex;align-items: center;justify-content: center;border-radius: 6px;">拍照</div>
                </div> -->
                <span style="margin-top: 10px; cursor: pointer; color: blue; display: block" v-if="item.defImg"><span @click="openDefimg(item.defImg)">查看示例图片</span></span>
              </div>
            </el-form-item>
          </div>
          <div v-if="showBox">
            <!-- <el-form-item label="学历承诺书" v-if="platform('lyky')">
                            <el-button type="primary" @click="downReader">下载</el-button>
                        </el-form-item> -->
            <el-form-item label="健康查体表" v-if="platform('lyky')">
              <span style="color: red; line-height: 20px !important">请先下载附件,将附件打印并填写完整后再点击上传</span>
              <upload
                action="/admin/MemberApply/upload"
                accept="image/*"
                :data="{ field: 'jkcns' }"
                :fileList="JkfileList.fileList"
                :plain="false"
                @change="upChange($event, item.field_id)"
                @remove="remove('jkcns')"
                @PictureCard="PictureCard(JkfileList, $event)"
                :ref="'imgjkcns'"
              />
              <el-button type="text" @click="downFuled">附件下载</el-button>
            </el-form-item>
          </div>
          <div v-if="objinvoice[formLabelAlign.gz] == '开启'">
            <van-field v-model="shuihao" label-class="lablesClass" class="vant" label="发票税号"> </van-field>
            <van-field v-model="hutou" label-class="lablesClass" class="vant" label="发票户头"> </van-field>
            <el-form-item label="发票截图">
              <span style="color: red; line-height: 20px !important">发票信息为选填项，需要开发票请将发票信息拍照上传</span>
              <upload
                action="/admin/MemberApply/upload"
                accept="image/*"
                :data="{ field: 'image' }"
                :fileList="FpfileList.fileList"
                :plain="false"
                @change="upChange($event, item.field_id)"
                @remove="remove('image')"
                @PictureCard="PictureCard(FpfileList, $event)"
                :ref="'imgimage'"
              />
            </el-form-item>
          </div>
          <!-- autographPath4  v-if="(platform('sjhg'))"-->
          <div v-for="item in fromList.filter(el=>el.field_type == 'autowrite')" :key="item.id+1254854852649852">
            <div v-if="item.field_type == 'autowrite' && http.indexOf('jingxin') == -1">
            <el-form-item :label="item.label" :required="Boolean(item.selected)">
              <div v-if="item.field_id == 'jkcns'">
                <div @click="writeName(item.field_id, 'DomImg' + item.field_id)" v-if="!autographPath1" style="display:flex;justify-content: center;align-items: center;width:100%;height:100px;background-color: #F5F5F5;font-size: 20px;">
                  签名
                </div>
                <!-- <el-button type="primary" @click="writeName(item.field_id, 'DomImg' + item.field_id)" v-if="!autographPath1">签名</el-button> -->
                <img v-else :src="autographPath1" alt="" style="width:100%;height:100px; cursor: pointer;background-color: #F5F5F5;" @click="writeName(item.field_id, 'DomImg' + item.field_id)" />
                <span style="margin-top: 10px; cursor: pointer; color: blue; display: block;position: absolute;top: -37px;right: 0;"
                  ><span @click="openBook">阅读{{ item.label }}</span></span
                >
              </div>
              <div v-if="item.field_id == 'zjbl'">
                <div @click="writeName(item.field_id, 'DomImg' + item.field_id)" v-if="!autographPath2" style="display:flex;justify-content: center;align-items: center;width:100%;height:100px;background-color: #F5F5F5;font-size: 20px;">
                  签名
                </div>
                <!-- <el-button type="primary" @click="writeName(item.field_id, 'DomImg' + item.field_id)" v-if="!autographPath2">签名</el-button> -->
                <img v-else :src="autographPath2" alt="" style="width:100%;height:100px; cursor: pointer;background-color: #F5F5F5;" @click="writeName(item.field_id, 'DomImg' + item.field_id)" />
                <span style="margin-top: 10px; cursor: pointer; color: blue; display: block;position: absolute;top: -37px;right: 0;"
                  ><span @click="openBookXY">阅读{{ item.label }}</span></span
                >
              </div>
            </el-form-item>
            </div>
            <div v-if="item.field_type == 'autowrite' && http.indexOf('jingxin') != -1">
              <el-form-item :label="item.label" :required="Boolean(item.selected)">
                <div v-if="item.field_id == 'jkcns'">
                  <upload
                    action="/admin/MemberApply/upload"
                    accept="image/*"
                    :data="{ field: item.field_id }"
                    :fileList="item.fileList"
                    :plain="false"
                    @change="upChange($event, item.field_id)"
                    :sefelfs="item.field_id"
                    @remove="remove(item.field_id)"
                    @PictureCard="PictureCard(item, $event)"
                    :ref="'img' + item.field_id"
                    :showPictureCard="false"
                    value="签名图片"
                  />
                  <span style="margin-left: 50px; cursor: pointer; color: red;position: absolute;top: -37px;right: 0;" @click="openBook">阅读{{ item.label }}</span>
                </div>
                <div v-if="item.field_id == 'zjbl'">
                  <upload
                    action="/admin/MemberApply/upload"
                    accept="image/*"
                    :data="{ field: item.field_id }"
                    :fileList="item.fileList"
                    :plain="false"
                    @change="upChange($event, item.field_id)"
                    @remove="remove(item.field_id)"
                    @PictureCard="PictureCard(item, $event)"
                    :ref="'img' + item.field_id"
                    :showPictureCard="false"
                    value="签名图片"
                  />
                  <span style="margin-left: 10px; cursor: pointer; color: red;position: absolute;top: -37px;right: 0;" @click="openBookXY">阅读{{ item.label }}</span>
                </div>
              </el-form-item>
            </div>
            <div v-if="item.field_id == 'edu_photo' && ((platform('lyky') && showBox) || platform('zkqc'))">
              <el-form-item label="学历承诺书" :required="Boolean(item.selected)">
                <span style="color: red; line-height: 20px !important" v-if="!platform('zkqc')">学历承诺书与毕业证二选一</span>
                <div>
                  <el-button type="primary" @click="writeName('edu_photo', 'DomImgXL')" v-if="!autographPath3">签名 </el-button>
                  <img v-else :src="autographPath3" alt="" style="width: 100px; height: 60px; cursor: pointer" @click="writeName('edu_photo', 'DomImgXL')" />
                  <span style="margin-top: 10px; cursor: pointer; color: blue; display: block"><span @click="openBookXl">阅读学历承诺书</span></span>
                </div>
              </el-form-item>
            </div>
          </div>
          <el-form-item label="诚信声明" v-if="(platform('sjhg'))">
            <div @click="writeName('cxsm', null)" v-if="!autographPath5" style="display:flex;justify-content: center;align-items: center;width:100%;height:100px;background-color: #F5F5F5;font-size: 20px;">
              签名
            </div>
            <!-- <el-button type="primary" @click="writeName('cxsm', null)" v-if="!autographPath5">签名</el-button> -->
            <img v-else :src="autographPath5" alt="" style="width:100%;height:100px;background-color: #F5F5F5; cursor: pointer" @click="writeName('cxsm', null)" />
            <span style="margin-left: 50px; cursor: pointer; color: red;position: absolute;top: -30px;right: 0;" @click="openBookalert('cxsm','诚信声明')">阅读诚信声明</span>
          </el-form-item>
          <el-form-item label="承诺事项" v-if="(platform('guangtai')&&formLabelAlign.gz == '特种作业')">
            <div @click="writeName('cnsx', null)" v-if="!autographPath6" style="display:flex;justify-content: center;align-items: center;width:100%;height:100px;background-color: #F5F5F5;font-size: 20px;">
              签名
            </div>
            <!-- <el-button type="primary" @click="writeName('cnsx', null)" v-if="!autographPath6">签名</el-button> -->
            <img v-else :src="autographPath6" alt="" style="width:100%;height:100px;background-color: #F5F5F5; cursor: pointer" @click="writeName('cnsx', null)" />
            <span style="margin-left: 50px; cursor: pointer; color: red;position: absolute;top: -30px;right: 0;" @click="openBookalert('cnsx','承诺事项')">阅读承诺事项</span>
          </el-form-item>
          <el-form-item label="知情同意书" v-if="(platform('kaiqi')||platform('mingda'))&&formLabelAlign.gz == '特种作业'">
            <div @click="writeName('zqtys', null)" v-if="!autographPath7" style="display:flex;justify-content: center;align-items: center;width:100%;height:100px;background-color: #F5F5F5;font-size: 20px;">
              签名
            </div>
            <!-- <el-button type="primary" @click="writeName('zqtys', null)" v-if="!autographPath7">签名</el-button> -->
            <img v-else :src="autographPath7" alt="" style="width:100%;height:100px;background-color: #F5F5F5; cursor: pointer" @click="writeName('zqtys', null)" />
            <span style="margin-left: 50px; cursor: pointer; color: red;position: absolute;top: -30px;right: 0;" @click="openBookalert('zqtys','知情同意书')">阅读知情同意书</span>
          </el-form-item>
          <el-form-item label="承诺项" v-if="init.district.includes('云南')&&formLabelAlign.gz == '特种作业'">
            <div @click="writeName('cnx', null)" v-if="!autographPath8" style="display:flex;justify-content: center;align-items: center;width:100%;height:100px;background-color: #F5F5F5;font-size: 20px;">
              签名
            </div>
            <!-- <el-button type="primary" @click="writeName('cnx', null)" v-if="!autographPath8">签名</el-button> -->
            <img v-else :src="autographPath8" alt="" style="width:100%;height:100px;background-color: #F5F5F5; cursor: pointer" @click="writeName('cnx', null)" />
            <span style="margin-left: 50px; cursor: pointer; color: red;position: absolute;top: -30px;right: 0;" @click="openBookalert('cnx','承诺项')">阅读承诺项</span>
          </el-form-item>
          <!-- <el-form-item label="报名表下载" v-if="(platformAnhui() || platform('qiye')) && formLabelAlign.gz == '特种作业'">
            <el-button type="primary" @click="downloadImg2('报名表下载')" style="height: 100%">下载</el-button>
          </el-form-item> -->
          <el-form-item label="任命文书下载" v-if="(platformAnhui() || platform('qiye')) && (formLabelAlign.gz == '一般工贸' || formLabelAlign.gz == '高危安管')">
            <el-button type="primary" @click="downloadImg2('任命文书下载')" style="height: 100%">下载</el-button>
          </el-form-item>
          <!-- <el-form-item label="登记表下载" v-if="(platform('xinhua')) && (formLabelAlign.gz == '安全管理')">
            <el-button type="primary" @click="downloadImg2('登记表下载')" style="height: 100%">下载</el-button>
          </el-form-item> -->
        </el-form>
        <div class="box_form_title" style="margin-top: 10px; margin-bottom: 10px">
          <el-button type="primary" @click="commit" v-if="http.indexOf('taihua') == -1 || (http.indexOf('taihua') != -1 && formLabelAlign.gz != '学历提升')">{{
            platform("lyky") || platform("xtaq") || (platform("zcaq") && formLabelAlign.gz == "大培训") ? "提交并登录" : "提交"
          }}</el-button>
          <el-button type="primary" @click="commitA" v-else>提交</el-button>
          <!-- <el-button type="danger" v-if="isJf" @click="()=>{
                                    this.$refs.jf.open()
                                }">我已报名,去缴费</el-button> -->
          <div v-if="isJf&&!platform('bosheng')" style="color: #f00; margin-top: 12px">已报名未交费学员,请输入身份证、培训科目等信息进行缴费即可开通培训权限</div>
        </div>
      </div>
    </div>
    <mumuCamera :show.sync="showcamera" @info="chengePhoto" @success="imgurl" :options="setOptions"></mumuCamera>
    <simpleCrop :crop-params="cropParams" @crop="crop" v-if="isShowImgCard" @close="closeCallback"></simpleCrop>
    <!-- <ImgCutter @cutDown="cutDown"></ImgCutter> -->
    <van-dialog v-model="dialogShow" show-cancel-button @cancel="dialogShow = false" :before-close="submit">
      <div slot="title" style="padding: 0 20px">
        <span>签名</span>
        <i
          class="el-icon-refresh"
          style="float: right"
          @click="
            () => {
              if(this.fileNameWirth != '注意事项'){
                this.formLabelAlign[this.fileNameWirth] = '';
              }
              this.formLabelAlign.signature = this.formLabelAlign.jkcns || this.formLabelAlign.zjbl || this.formLabelAlign.edu_photo || '';
              this.autographPath = this.formLabelAlign.signature;
              if (this.fileNameWirth == 'edu_photo') {
                this.autographPath3 = this.$refs.autograph.clear();
                this.formLabelAlign.edu_photo = '';
              } else if (this.fileNameWirth == 'jkcns') {
                this.autographPath1 = this.$refs.autograph.clear();
                this.formLabelAlign.jkcns = '';
              } else if (this.fileNameWirth == 'zjbl') {
                this.formLabelAlign.zjbl = '';
                this.autographPath2 = this.$refs.autograph.clear();
              }else if (this.fileNameWirth == '注意事项') {
                this.formLabelAlign.extra.注意事项 = '';
                this.autographPath4 = this.$refs.autograph.clear();
              }else if (this.fileNameWirth == 'cxsm') {
                this.formLabelAlign.extra.cxsm = '';
                this.autographPath5 = this.$refs.autograph.clear();
              }
              else if (this.fileNameWirth == 'cnsx') {
                this.formLabelAlign.extra.cnsx = '';
                this.autographPath6 = this.$refs.autograph.clear();
              }
              else if (this.fileNameWirth == 'zqtys') {
                this.formLabelAlign.extra.zqtys = '';
                this.autographPath7 = this.$refs.autograph.clear();
              }
              else if (this.fileNameWirth == 'cnx') {
                this.formLabelAlign.extra.cnx = '';
                this.autographPath8 = this.$refs.autograph.clear();
              }
            }
          "
        ></i>
      </div>
      <autograph ref="autograph"> </autograph>
    </van-dialog>
    <van-dialog v-model="dialogVisible" @cancel="dialogVisible = false" title="提示">
      <div style="height: 70vh;padding:0 8px;font-size: 14px;font-family: '微软雅黑';overflow: auto;">
        <el-input v-model="str" type="textarea" placeholder="请输入内容" :autosize="{ minRows: 2 }" resize="none" :readonly="true" class="tipTextarea"></el-input>
      </div>
    </van-dialog>
    <div id="DomImgjkcns" class="DomImg">
      <div class="A4page">
        <h1>个人健康承诺</h1>
        <div style="margin-top: 80px">
          <p style="text-indent: 50px; font-family:'宋体'">
            本人姓名<u>{{ formLabelAlign.nickname }}</u
            >，身份证号码<u>{{ formLabelAlign.username }}</u
            >，现申请<u>{{ subjectTitle }}</u
            >（作业类别）特种作业操作证。本人身体健康，无妨碍从事相应特种作业的器质性心脏病、癫痫病、美尼尔氏症、眩晕症、癔病、震颤麻痹症、精神病、痴呆症以及其他疾病和生理缺陷。{{init.district.includes('云南')? '本人承诺：':''}}本人对以上信息的真实性负责，如有隐瞒，相关责任全部由本人承担。
          </p>
          <p style="text-indent: 50px; font-family:'宋体'" v-if="init.district.includes('云南')">特此承诺</p>
          <div style="width: 100%; display: flex; justify-content: flex-end; padding-right: 30px; margin-top: 150px">
            <span style="font-size: 30px">承诺人（签字）：</span>
            <img :src="autographPath1" style="height: 70px" alt="" />
          </div>
          <div style="width: 100%; display: flex; justify-content: flex-end; padding-right: 30px;" v-if="init.district.includes('云南')">
            <p style="font-size: 30px;min-width: 300px;">电话：{{ formLabelAlign.phone }}</p>
          </div>
          <div style="width: 100%; display: flex; justify-content: flex-end">
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getFullYear() }}年</span>
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getMonth() + 1 }}月</span>
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getDate() }}日</span>
          </div>
        </div>
      </div>
    </div>
    <div id="DomImgXL" class="DomImg">
      <div class="A4page">
        <h1>个人学历承诺</h1>
        <div style="margin-top: 80px">
          <p style="text-indent: 50px; font-family:'宋体'">
            本人姓名<u>{{ formLabelAlign.nickname }}</u
            >，身份证号码<u>{{ formLabelAlign.username }}</u
            >，现承诺，本人具有{{ formLabelAlign.education }}学历，以上内容真实有效，如有虚假，本人愿意承担相应责任
          </p>
          <div style="width: 100%; display: flex; justify-content: flex-end; padding-right: 30px; margin-top: 150px">
            <span style="font-size: 30px">承诺人（签字）：</span>
            <img :src="autographPath3" style="height: 70px" alt="" />
          </div>
          <div style="width: 100%; display: flex; justify-content: flex-end">
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getFullYear() }}年</span>
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getMonth() + 1 }}月</span>
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getDate() }}日</span>
          </div>
        </div>
      </div>
    </div>
    <div id="DomImgzjbl" class="DomImg">
      <div class="A4page">
        <h1>证件办理费用协议</h1>
        <div style="margin-top: 80px">
          <div>
            <p>甲方:</p>
            <p>乙方:</p>
          </div>
          <div>
            <p>一、甲方依据相关规定收取乙方培训、考试、办理及发放证件等费用，并依法对乙方提供相关服务。</p>
            <p>二、乙方必须按甲方规定时间进行培训、考试及取证，因乙方个人原因及行为不能按时参加培训、考试及无法取证者，甲方不予退费。</p>
            <p>三、从报名开始，六个月之内必须考完，否则视为自动放弃。</p>
            <p>四、代办人员需将本协议告知学员本人。</p>
            <p>本人已阅读并同意上述协议内容。</p>
          </div>
          <div style="height: 300px; width: 460px" v-if="formLabelAlign.id_card_photo">
            <img style="width: 100%; height: 100%" crossOrigin="Anonymous" :src="formLabelAlign.id_card_photo + '?' + new Date().getTime()" alt="" />
          </div>
          <!--  v-if="formLabelAlign.id_card_emblem" -->
          <div style="height: 300px; width: 460px" v-if="formLabelAlign.id_card_emblem">
            <img style="width: 100%; height: 100%" crossOrigin="Anonymous" :src="formLabelAlign.id_card_emblem + '?' + new Date().getTime()" alt="" />
          </div>
          <div style="width: 100%; display: flex; justify-content: flex-end; padding-right: 30px; margin-top: 100px">
            <span style="font-size: 30px">承诺人（签字）：</span>
            <img :src="autographPath" v-if="autographPath2" style="height: 70px" alt="" />
          </div>
          <div style="width: 100%; display: flex; justify-content: flex-end">
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getFullYear() }}年</span>
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getMonth() + 1 }}月</span>
            <span style="font-size: 30px; padding: 0 30px">{{ new Date().getDate() }}日</span>
          </div>
        </div>
      </div>
    </div>
    <!-- <iframe :src="iframeSrc">
        </iframe> -->
       
    <jf ref="jf" :openid="openid"></jf>
    <van-popup v-model="TCshow" :style="{ height: '30%' }">
      <span @click="copy" style="display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; font-size: 1rem; color: #f00">
        点击复制该链接在外部浏览器中打开
      </span>
    </van-popup>
    <el-dialog title="编辑背景色" :visible.sync="showProBack" top="20px" width="100%" v-loading="showProBackLoading">
      <div style="
      display:flex;
      flex-direction:column;
      align-items:center;">
        <img :src="backPhoto" alt="" style="height:350px;width:250px;">
        <div style="display: flex;" >
          <p style="margin: 10px 15px;background-color: #fff;height:40px;width:40px;display: flex;align-items: center;justify-content: center;border-radius: 50%;box-shadow: 0px 2px 6px 0 #aaa;cursor: pointer;" @click="checkBackGround('0')"></p>
          <p v-if="!platform('sjhg')" style="margin: 10px 15px;background-color: blue;height:40px;width:40px;display: flex;align-items: center;justify-content: center;border-radius: 50%;box-shadow: 0px 2px 6px 0 #aaa;cursor: pointer;" @click="checkBackGround('1')"></p>
          <p v-if="!platform('sjhg')" style="margin: 10px 15px;background-color: #f00;height:40px;width:40px;display: flex;align-items: center;justify-content: center;border-radius: 50%;box-shadow: 0px 2px 6px 0 #aaa;cursor: pointer;" @click="checkBackGround('2')"></p>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="commitEditPhtot">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import {Department,aliasOCR,photoMake, applyList, applyAdd, subjectList, regionList, H5PayList, H5Pay, getcode, getopenid, mpo, sendcode, getapplyInfor,axios } from "@/api/apply.js";
import { mapGetters } from "vuex";
import "vant/lib/cascader/style";
import simpleCrop from "simple-crop/index.vue";
import "simple-crop/template-2.css";
import { dataURLtoFile } from "@/utils/64batatoFile";
import autograph from "@/components/autograph";
import { upFile, upFileqm ,isNeedFixPhoto} from "@/utils/upFiel.js";
import { download } from "@/api/download.js";
import Taihua from "./components/taihua.vue";
import ImgCutter from 'vue-img-cutter'
import {downloadAll} from '@/api/download.js';
import mumuCamera from './mumuCamera.vue';
import {ImagePreview} from 'vant';
// import axios from "axios";
// import'@/styles/mobile.css';

import jf from "./jf.vue";
import { setapplyid, getapplyid, delapplyid, setopenId, getopenId, delopenId, setstartInfo, delstartInfo, getstartInfo } from "@/utils/cookie.js";
export default {
  components: {
    simpleCrop,
    autograph,
    jf,
    Taihua,
    ImgCutter,
    mumuCamera
  },
  computed: {
    ...mapGetters(["init", "http"]),
  },
  watch:{
    showdepbox(val){
      if(val){
        Department().then(res=>{
          this.depList=res.data
        })
      }
    }
  },
  data() {
    return {
      deptitle:'',
      showdepbox:false,
      depList:[],
      setting:{},
      showexType: false,
      minDate: new Date(1900, 0, 1),
      fromList: [],
      formLabelAlign: {
        gz: "",
        isShow: "",
        options: [],
        extra: { address: "", CNPtype: "" },
      },
      
      codeChk: "",
      JsonListFrom: {},
      GZList: [],
      qyname: "",
      qylogo: "",
      loading: false,
      fileList: [],
      subjectListTree: [],
      subjectlist: "",
      Arrpass: [], //
      showPicker: false,
      showCascader: false,
      Cascadervalue: "",
      pakeHotl: [],
      titleA: "初培",
      pearit: {},
      isShowImgCard: false,
      showProBack:false,//图片背景色修改弹框
      showProBackLoading:false,//图片背景色修改弹框
      backPhoto:'',//修改之后的url
      backPhotoFile:'',//修改之后的file类型文件
      cropParams: {
        // title: "编辑图片(可以拖动边框改变截取图片大小)", //标题
        src: "", // 裁剪图片地址
        size: {
          // 裁剪尺寸
          width: 390,
          height: 567,
        },
        rotateSlider: true, //是否开启旋转刻度盘
        cropSizePercent: 0.65, //裁剪框显示比例
        borderWidth: 1, //裁剪框边框宽度
        funcBtns:["close", "crop",'around', 'reset'], //功能按钮配置
        borderColor:"#fff", //裁剪框边框颜色
        coverColor:"rgba(0,0,0,0.5)", //裁剪框遮罩颜色
        startAngle:-360,//旋转刻度盘开始角度
        endAngle:360, //旋转刻度盘结束角度
      },
      dialogShow: false,
      autographPath: "", //签名图片地址
      autographPath1: "", //签名图片地址
      autographPath2: "", //签名图片地址
      autographPath3: "", //签名图片地址
      autographPath4: "", //签名图片地址
      autographPath5: "", //签名图片地址
      autographPath6: "", //签名图片地址
      autographPath7: "", //签名图片地址
      autographPath8: "", //签名图片地址
      dialogVisible: false,
      str: "",
      openid: "",
      subjectTitle: "",
      iframeSrc: "",
      isJf: false, // 是否开启在线缴费
      objinvoice: {}, //发票信息
      hutou: "", //发票户头
      shuihao: "", //发票税号
      FpfileList: { fileList: [], field_id: "image" }, //发票图片表
      JkfileList: { fileList: [], field_id: "jkcns" }, //发票图片表
      Rootloading: false,
      admin_user_id: "",
      depid: "",
      dep: "",
      showBox: false,
      TCshow: false,
      downloadURL: "",
      fileNameWirth: "", //被签名字段
      DOMID: "DomImgJK", //dom id
      hascodeYes: true,
      codeTime: 60,
      timeObj: Object,
      showCompanyType: false,
      showAddress: false,
      typeList: ["一般工贸", "普货运输", "危货运输", "汽车维修", "驾驶培训", "危化品"],
      addressList: ["禹会", "蚌山", "龙子湖", "经开", "高新", "淮上", "怀远", "固镇", "五河"],
      //洛阳机车一般工贸学历开始时间
      xueli_time: new Date(),
      xueli_starttime: "",
      //洛阳机车一般工贸学历结束时间
      xueli_endtime: "",
      //洛阳机车一般工贸工作开始时间
      gongzuo_starttime: "",
      //洛阳机车一般工贸工作结束时间
      gongzuo_endtime: "",
      work_starttime: "",
      work_endtime: "至今",
      arrlist: [],
      iphoneDirection:true, //纵向是 true 横向是 false

      showcamera:false,//相机弹框
      photoApply:false,//身份证扫描
      setOptions:{},//拍照设置
    };
  },
  async created() {
    // this.init()
    if (this.$route.query.adminid) {
      this.admin_user_id = this.$route.query.adminid;
      this.depid = this.$route.query.depid;
      this.dep = this.$route.query.dep;
      setstartInfo(
        JSON.stringify({
          admin_user_id: this.$route.query.adminid,
          depid: this.$route.query.depid,
          dep: this.$route.query.dep,
        })
      );
    } else {
      this.admin_user_id = "";
      this.depid = "";
      this.dep = "";
      console.log(this.platformAnhui());
      if(this.platformAnhui()){
        setstartInfo(
          JSON.stringify({
            admin_user_id: "1106",
            depid: 1,
            dep:1,
          })
        );
        this.admin_user_id = "1106";
        this.depid = "1";
        this.dep = "1";
      }else{
        delstartInfo()
      }
    }
    this.GZList = this.init.selected_gz.split(",");
    if (this.platform("xtaq")) {
      this.GZList = ["大培训"];
    }
    if (this.platform("yali")) {
      this.GZList.map((item, index) => {
        if (item == "一般工贸") {
          this.GZList[index] = "一般行业";
        }
        if (item == "安全管理") {
          this.GZList[index] = "危化品";
        }
      });
    }
    if (this.platform("dkaq")) {
      this.GZList.map((item, index) => {
        if (item == "安全管理") {
          this.GZList[index] = "高危安管";
        }
      });
    }
    let setting = JSON.parse(this.init.setting);
    this.setting = JSON.parse(this.init.setting);
    if (this.$route.query.name) {
      this.formLabelAlign.gz = this.$route.query.name;
      window.sessionStorage.setItem('Homegz',this.$route.query.name)
    } else {
      if(window.sessionStorage.getItem('Homegz')&&window.sessionStorage.getItem('Homegz')!='undefined'){
        this.formLabelAlign.gz = window.sessionStorage.getItem('Homegz')
      }else{
        this.formLabelAlign.gz = this.GZList[0];
      }
    }
    this.qyname = this.init.alias;
    this.qylogo = this.init.qylogo;
    this.applyListData(this.formLabelAlign.gz);
    this.subject(this.formLabelAlign.gz);
    if (setting.invoice) {
      this.objinvoice = JSON.parse(setting.invoice);
    }
    if (setting.bmSerm) {
      this.str = JSON.parse(JSON.stringify(setting.bmSerm));
      this.dialogVisible = true;
      // this.$alert(setting.bmSerm,'提示',{
      //     confirmButtonText: '确定',
      //     callback: () => {
      //     },
      //     showClose:false,
      // })
    }
    if(setting.applyPhoto&&setting.applyPhoto=='是'){
      this.photoApply = true
    }else{
      this.photoApply = false
    }

    //微信客户端 直接获取openid
   

    
    if (getapplyid()) {
      H5PayList({ applyid: getapplyid() }).then((resA) => {
        if (resA.code == 200) {
          if (resA.data != "支付成功") {
            this.$toast.fail(resA.data + ",请联系管理员");
            delapplyid();
          } else {
            this.$toast.success("支付成功,两秒后自动跳转到登录页面");
            delapplyid();
            setTimeout(() => {
              window.open(this.http + "/user", "_self");
            }, 2000);
          }
        } else {
          this.$toast.fail(resA.msg);
          delapplyid();
          done();
        }
      });
    } else {
      if (navigator.userAgent.match(/MicroMessenger/i)) {
        if (!getopenId()) {
          this.Rootloading = true;
          getcode().then((res) => {
            // window.open(res.data,'_self')
            if (res.code == 200) {
              // this.iframeSrc=res.data.url
              setopenId(res.data.state);
              window.open(res.data.url, "_self");
            }
          });
        } else {
          this.Rootloading = false;
          getopenid({ state: getopenId() }).then((res) => {
            if (res.code == 200) {
              this.openid = res.data.openid;
              delopenId();
            } else {
              delopenId();
            }
          });
        }
      }
      if (setting.PCwxpay == "是") {
        this.isJf = true;
        if (setting.payType == "H5") {
          if (navigator.userAgent.match(/MicroMessenger/i)) {
            this.$dialog
              .confirm({
                title: "提示",
                message: "培训缴费学员请点击右上角···标识，选择在浏览器中打开",
              })
              .then(() => {})
              .catch(() => {});
          }
        } else {
          if (!navigator.userAgent.match(/MicroMessenger/i)) {
            this.$dialog
              .confirm({
                title: "提示",
                message: "培训缴费学员请复制该链接在微信中打开，" + location.href,
              })
              .then(() => {})
              .catch(() => {});
          } else {
          }
        }
      } else {
        this.isJf = false;
      }
    }
    if (this.formLabelAlign.gz == "特种设备") {
      this.showBox = true;
    } else {
      this.showBox = false;
    }
    // window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() { 
    //   if (window.orientation === 180 || window.orientation === 0) { 
    //       console.log("竖屏"); 
    //     } if (window.orientation === 90 || window.orientation === -90 ){ 
    //       console.log("横屏");
    //     } }, false);
    // window.addEventListener('deviceorientation',this.orientationHandler,false) 重力感应
    // function orientationHandler(event) {
    //      document.getElementById("alpha").innerHTML = event.alpha;
    //      document.getElementById("beta").innerHTML = event.beta;
    //      document.getElementById("gamma").innerHTML = event.gamma;
    //      document.getElementById("heading").innerHTML = event.webkitCompassHeading;
    //      document.getElementById("accuracy").innerHTML = event.webkitCompassAccuracy;
    //  }
  },
  methods: {
    // orientationHandler(event) {
    //   if(event.beta<10&&event.beta>-10&&event.gamma<10&&event.gamma>-10){
    //     if(event.alpha<110&&event.alpha>70){
    //       this.iphoneDirection=false
    //     }else{
    //       this.iphoneDirection=true
    //     }
    //   }
    // },
    finshType(val) {
      this.showCompanyType = false;
      this.formLabelAlign.extra.CNPtype = val;
    },
    finshwxType(val) {
      this.showexType = false;
      this.formLabelAlign.extra.企业性质 = val;
    },
    finshAddress(val) {
      this.showAddress = false;
      this.formLabelAlign.extra.address = val;
    },
    login() {
      window.open(this.http + "/user", "_self");
    },
    //获取验证码
    hoveCode() {
      if (!this.formLabelAlign.phone) {
        return this.$toast.fail("手机号不能为空");
      }
      this.codeTime = 60;
      this.hascodeYes = false;
      clearInterval(this.timeObj);
      sendcode({
        mobile: this.formLabelAlign.phone,
      }).then((res) => {
        if (res.code == 200) {
          this.$toast.success("验证码发送成功");
          this.timeObj = setInterval(() => {
            if (this.codeTime <= 0) {
              this.hascodeYes = true;
              clearInterval(this.timeObj);
            }
            this.codeTime--;
          }, 1000);
        }
      });
    },
    applyListData(gz) {
      this.loading = true;
      applyList({ gz, usage: "apply" }).then((res) => {
        this.loading = false;
        if (res.code == 200) {
          this.fromList = res.data.filter((item) => item.label != "工种").filter((item) => item.label != "初复审");
          // res.data.map(item=>{
          //     if(item.field_id!='gz'){
          //         this.formLabelAlign[item.field_id]=item.placeholder
          //     }
          // })
          this.fromList.map((item) => {
            if (this.formLabelAlign.gz == "一般工贸" && item.label == "职称" && this.platform("saite")) {
              item.options = '[{"e":"高级"},{"e":"中级"},{"e":"初级"},{"e":"无"}]';
            }
            if(this.platformAnhui()){
              if(item.field_id=='photo'){
                item.label='大头照'
              }
            }
          });
          JSON.parse(JSON.stringify(this.fromList))
            .filter((item) => item.field_type == "json")
            .map((item) => {
              JSON.parse(item.options).map((it) => {
                this.JsonListFrom[it.label];
              });
            });
          // res.data.map((item) => {
          //   item.passShow = true;
          // });
          res.data.map((item) => {
            item.passShow = true;
            this.formLabelAlign.isShow = item.field_id;
            if (item.field_id != "gz") {
              this.formLabelAlign[item.field_id] = item.placeholder;
            }
            if (gz == "特种作业") {
              if (item.label == "现持证书信息") {
                item.passShow = false;
              }
            }
            if (gz == "一般工贸") {
              if (item.label == "安全合格证证号" || item.label == "截止日期") {
                item.passShow = false;
              }
            }
            if(gz == '职业卫生'){
              if(this.platform('ataq')){
                if(item.field_id=='training_record'){
                  item.passShow = false;
                }
              }
            }
          });
          // Object.assign(this.formLabelAlign, { isShow: "input", options: [] });
          if (this.http.indexOf("zaah") != -1) {
            this.formLabelAlign.subject_id = this.$route.query.id;
          }
          this.Arrpass = res.data;
        }
      });
    },
    //切换工种
    gzChange(value) {
      this.applyListData(value);
      this.subject(value);
      if (value == "特种设备") {
        this.showBox = true;
      } else {
        this.showBox = false;
      }
    },
    //init
    // async init(){
    //    await applyInit().then( res=>{
    //         if(res.code==200){
    //             console.log(res)
    //             this.GZList=res.data.selected_gz.split(',')
    //             this.qyname=res.data.alias
    //             this.formLabelAlign.gz=this.GZList[0]
    //             this.applyListData(this.GZList[0])
    //             this.subject(this.GZList[0])
    //         }
    //     })
    // },
    //科目
    subject(gz) {
      subjectList(gz).then((res) => {
        this.subjectListTree = res;
        if (this.platform("xtaq") || this.platform("zcaq")) {
          this.subjectListTree = res.filter((item) => {
            return item.id == 794;
          });
        }
        if(this.platform('hshd')&&(gz=='特种作业'||gz=='安全管理')){
          var lop = function (list=[]) {
            for (let index = 0; index < list.length; index++) {
              const item = list[index];
              if(item.title=='初培'){
                // item.disabled=true
                list.splice(index,1)
              }else{
                lop(item.children)
              }
            }
          }
          lop(this.subjectListTree)
        }
        // if (this.platform("xinhua")&&gz=='安全管理') {
        //   this.subjectListTree = res.filter((item) => {
        //     return item.title == '烟花爆竹生产单位' || item.title == '烟花爆竹经营单位';
        //   });
        // }
      });
    },
    //科目切换
    subChange(value) {
      let selected = [];
      let selectedOptions = value.selectedOptions;
      this.showCascader = false;
      let subject = []
      selectedOptions.map(item=>{
        subject.push(item.title)
      })
      value.selectedOptions.map((item) => {
        selected.push(item.id);
      });
      if (selectedOptions.length == 3) {
        this.subjectTitle = selectedOptions[1].title;
      } else {
        this.subjectTitle = selectedOptions[0].title;
      }
      // .indexOf('危险化学品生产单位')
      
      
      this.formLabelAlign.subject_id = value.value;
      this.formLabelAlign.subject_ids = selected.join(",");
      this.titleA = selectedOptions[selectedOptions.length - 1].title;
      this.itemA = selectedOptions[selectedOptions.length - 1];
      if (selectedOptions[selectedOptions.length - 1].title.indexOf("初培") != -1 || selectedOptions[selectedOptions.length - 1].title.indexOf("复审") != -1) {
        this.formLabelAlign.exam_type = selectedOptions[selectedOptions.length - 1].title;
      } else {
        this.formLabelAlign.exam_type = "初审";
      }
      // this.$forceUpdate();
      let gz = this.formLabelAlign.gz;
      // this.Arrpass.map((item) => {
        
      // });
      this.Arrpass.map((item) => {
        item.passShow = true;
        if (gz == "特种作业") {
          if (this.platformAnhui() || this.platform("qiye")) {
            if (item.field_id == "last_cert") {
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
            if (item.field_id == "qzsj") {
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
          } else {
            if (item.label == "现持证书信息") {
              if (this.formLabelAlign.exam_type.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
            if (item.label == "户口本" || item.label == "毕业证") {
              if (this.formLabelAlign.exam_type.indexOf("复审") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
          }
        }
        if (gz == "一般工贸") {
          if (this.platformAnhui()) {
            if (item.field_id == "last_cert") {
              //初培证书
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
            if (item.field_id == "qzsj") {
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
          } else {
            if (item.label == "安全合格证证号" || item.label == "截止日期") {
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
          }
        }
        if (gz == "安全管理"|| gz=='高危安管') {
          if (this.platformAnhui()) {
            if (item.field_id == "last_cert") {
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
            if (item.field_id == "zhicheng"){
              if(subject.indexOf('危险化学品生产单位')!=-1){
                item.passShow = true;
              }else{
                item.passShow = false;
              }
            }
            if (item.field_id == "edu_photo"){
              if(subject.indexOf('危险化学品生产单位')!=-1){
                item.hint = '毕业证和职称证选一个进行上传，须化工专业大专或中级职称以上证书';
              }else{
                item.hint = '毕业证和户口本选一个进行上传';
              }
            }
          }
          if (item.field_id == "qzsj") {
            if (this.titleA.indexOf("初培") != -1) {
              item.passShow = false;
            } else {
              item.passShow = true;
            }
          }
        }
        if(gz == '职业卫生'){
          if(this.platform('ataq')){
            if(item.field_id=='training_record'){
              if (this.titleA.indexOf("初培") != -1) {
                item.passShow = false;
              } else {
                item.passShow = true;
              }
            }
          }
        }
        if(this.platform('yuhua')){
          if (item.field_id == "edu_photo") {
            if (this.titleA.indexOf("复审") != -1) {
              item.passShow = false;
            } else {
              item.passShow = true;
            }
          }
        }
        if (item.field_id == this.formLabelAlign.isShow) {
          item.placeholder = selectedOptions.map((option) => option.title).join("/");
        }
      });
      this.$forceUpdate();
    },
    //图片编辑
    PictureCard(item, file) {
      this.pearit = item;
      this.isShowImgCard = true;
      // this.cropParams.src = '/imgurl/'+ file.url.split('https://tjy.taijieyun.com/')[1];
      this.cropParams.src = file.url
    },
    //剪辑图片
    crop(data) {
      this.isShowImgCard = false;
      this.asrsc = data.toDataURL();
      let file = dataURLtoFile(data.toDataURL());
      this.pearit.fileList = [
        {
          url: data.toDataURL(),
          name: "",
        },
      ];
      let srt = "img" + this.pearit.field_id;
      if (this.$refs[srt][0]) {
        this.$refs[srt][0].uploadImg(file);
      } else {
        this.$refs[srt].uploadImg(file);
      }
      // console.log()
    },
    //关闭剪辑
    closeCallback() {
      this.isShowImgCard = false;
    },
    HotChange(value) {
      let id = value.value;
      if (id > 9999) {
        this.deep(this.pakeHotl, id, null);
        return;
      }
      regionList({ region_pid: id }).then((res) => {
        if (res.data.list.length != 0) {
          this.deep(this.pakeHotl, id, res.data.list);
        }
      });
    },
    deep(list = [], id, children = []) {
      for (let i = 0; i < list.length; i++) {
        let item = list[i];
        if (item.region_id == id) {
          item.children = children;
          break;
        } else {
          this.deep(item.children, id, children);
        }
      }
    },
    // cutDown(event) {
    //   console.log(event)
    // },
    //input输入框 改变时触发
    inputChange(value) {
      if (value.field_type != "json") {
        this.formLabelAlign[this.formLabelAlign.isShow] = value.placeholder;
      } else {
        this.formLabelAlign[value.field_id] = JSON.stringify(this.JsonListFrom);
      }
      // if(txt=="dep"){
      //     this.formLabelAlign[data.field_id] = data.placeholder.join(',')
      // }
    },
    //上传照片时 触发
    upChange(file, label) {
      if (label == "photo" && file.size > 102400 && this.http.indexOf("暂无企业") != -1) {
        // 证件照小于100k
        // this.sefelfs=label
        this.$refs["img" + label][0].handleRemove();
        this.$toast.fail("上传照片不能大于100K!");
      } else {
        if (file.status == "ready") {
          
          // console.log(this.iphoneDirection,'6666');
          // isNeedFixPhoto(file.raw).then(res=>{
          //   console.log(res,'6666');
          // }).catch(err=>{
          //   console.log(err,'8888');
          // })
          this.arrlist = [];
          this.$refs["img" + label][0].commitUpload();
        }
      }
      if (file.status == "success" && file.response.code == 200) {
        // window.removeEventListener('deviceorientation',this.orientationHandler,false)
        if (label == "last_cert") {
          this.arrlist.push(file.response.data.url);
          this.formLabelAlign.last_cert = JSON.stringify(this.arrlist);
        } else {
          this.formLabelAlign[file.response.data.field] = file.response.data.url;
        }
        this.$toast.success(file.response.msg);
        // if (file.response.data.field == "hukou_photo") {
        //   this.Arrpass.map((item) => {
        //     if (item.field_id == "edu_photo") {
        //       item.selected = 0;
        //     }
        //   });
        // } else {
        //   this.Arrpass.map((item) => {
        //     if (item.field_id == "edu_photo") {
        //       item.selected = 1;
        //     }
        //   });
        // }
        // if (file.response.data.field == "edu_photo") {
        //   this.Arrpass.map((item) => {
        //     if (item.field_id == "hukou_photo") {
        //       item.selected = 0;
        //     }
        //   });
        // } else {
        //   this.Arrpass.map((item) => {
        //     if (item.field_id == "hukou_photo") {
        //       item.selected = 1;
        //     }
        //   });
        // }
      } else if (file.status == "success" && file.response.code != 200) {
        // window.removeEventListener('deviceorientation',this.orientationHandler,false)
        this.$toast.fail(file.response.msg);
      }
    },
    //删除照片时 触发
    remove(id) {
      this.formLabelAlign[id] = "";
      this.$forceUpdate()
    },
    //提交
    commit() {
      // console.log(this.$toCode('372924199607068671'),'加密')
      // console.log(this.$fromCode(this.$toCode('372924199607068671')),'解密')2555
      let formLabelAlign = JSON.parse(JSON.stringify(this.formLabelAlign));
      // console.log(formLabelAlign);
      // return
      
      if (this.http.indexOf("lyjc") != -1 && formLabelAlign.gz == "特种作业") {
        formLabelAlign.edu_period = JSON.stringify([this.xueli_starttime, this.xueli_endtime]);
        formLabelAlign.history = JSON.stringify([this.work_starttime, this.work_endtime]);
        if (this.xueli_starttime == "") {
          this.$message.warning("学历开始时间不能为空");
          return;
        } else if (this.xueli_endtime == "") {
          this.$message.warning("学历结束时间不能为空");
          return;
        } else if (this.work_starttime == "") {
          this.$message.warning("工作开始时间不能为空");
          return;
        } else if (this.work_endtime == "") {
          this.$message.warning("工作结束时间不能为空");
          return;
        }
      }
      // console.log(formLabelAlign.extra.企业性质,'aaaa');
      // // console.log(formLabelAlign);
      // return
      if (this.platform("yali")) {
        if (formLabelAlign.gz == "危化品") {
          formLabelAlign.gz = "安全管理";
        }
        if (formLabelAlign.gz == "一般行业") {
          formLabelAlign.gz = "一般工贸";
        }
      }
      if (this.platform("dkaq")) {
        if (formLabelAlign.gz == "高危安管") {
          formLabelAlign.gz = "安全管理";
        }
      }
      if (this.http.indexOf("bbxdf") != -1 || this.http.indexOf("testtjy") != -1) {
        if (this.formLabelAlign.extra.address == "") {
         return this.$message.warning("所在地区不能为空");
        } 
      }
      if(this.platformAnhui()&&!formLabelAlign.extra.企业性质){
        return this.$toast.fail("请选择企业性质");
      }
      if(this.platformAnhui()&&!formLabelAlign.extra.注意事项){
        return this.$toast.fail("注意事项请签名");
      }
      formLabelAlign.extra = JSON.stringify(formLabelAlign.extra);
      // console.log(formLabelAlign);
      // return
      let setting = JSON.parse(this.init.setting);
      if (this.hutou) {
        formLabelAlign.hutou = this.hutou;
      }
      if (this.shuihao) {
        formLabelAlign.shuihao = this.shuihao;
      }
      if (this.openid) {
        formLabelAlign.openid = this.openid;
      }
      if (this.codeChk) {
        formLabelAlign.codeChk = this.codeChk;
      }

      
      let IDCard = /^[1-9]\d{5}(17|18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$/; //身份证号校验
      let phone = /^1[3456789]\d{9}$/; //手机号校验
      // console.log(formLabelAlign)
      // return
      for (let i = 0; i < this.Arrpass.length; i++) {
        let items = this.Arrpass[i];
        if (items.field_id == "exam_type") {
          continue;
        }
        if (Boolean(items.selected) && !formLabelAlign[items.field_id] && items.field_id != "cert" && items.passShow) {
          this.$toast.fail(items.label + "不能为空");
          return;
        }
        if (Boolean(items.selected) && items.field_id == "cert" && items.passShow) {
          let obj = JSON.parse(formLabelAlign[items.field_id]);
          if (!formLabelAlign[items.field_id] || formLabelAlign[items.field_id] == "[]") {
            this.$toast.fail(items.label + "不能为空");
            return;
          }
          let list = JSON.parse(items.options);
          for (let j = 0; j < list.length; j++) {
            if (!obj[list[j].label]) {
              this.$toast.fail(list[j].label + "不能为空");
              return;
            }
          }
        }
        if (items.field_id == "username" && Boolean(items.selected) && !IDCard.test(formLabelAlign.username)) {
          this.$toast.fail("身份证不合法");
          return;
        }
        if (items.field_id == "phone" && Boolean(items.selected) && !phone.test(formLabelAlign.phone)) {
          this.$toast.fail("手机号码不合法");
          return;
        }
      }
      if ((this.platform("hzdpx") || this.platform("xtaq") || (this.platform("zcaq") && formLabelAlign.gz == "大培训")) && !formLabelAlign.codeChk) {
        return this.$toast.fail("请输入验证码");
      }
      // if(this.platform('dkaq')&&!formLabelAlign.extra.注意事项){
      //   return this.$toast.fail("请阅读注意事项并签名");
      // }
      if(this.platformAnhui()){
        const obj = getstartInfo() ? JSON.parse(getstartInfo()) : {};
        formLabelAlign.admin_user_id = obj.admin_user_id ? obj.admin_user_id : "";
        formLabelAlign.depid = obj.depid ? obj.depid : "";
        formLabelAlign.dep = obj.dep ? obj.dep : "";
      }
      
      if(this.platform('bosheng')&&formLabelAlign.gz=='燃气从业人员培训'){
        if(!formLabelAlign.dep){
          return this.$toast.fail("请选择部门");
        }
      }
      this.loading = true;
      applyAdd(formLabelAlign).then((res) => {
        if (getstartInfo()) {
          delstartInfo(); //删除之前的管理员信息
        }
        this.loading = false;
        if (res.code == 200) {
          if (setting.PCwxpay == "是") {
            // 判断是否有在线缴费的权限
            if (Number(this.itemA.price)) {
              //判断该科目是否是在线缴费
              let msg = "请点击下方培训交费按钮进行交费，交费成功后即可开通培训权限进行学习"
              if(this.platform("bosheng")){
                msg = '您已报名成功，该平台免费提供课程学习、题库练习、模拟考试、学习统计等服务功能，仅需支付平台运维费用'
              }
              this.$dialog
                .confirm({
                  title: "提示",
                  message: msg,
                  confirmButtonText: '去交费',
                  beforeClose: (action, done) => {
                    if (action == "confirm") {
                      if (setting.payType == "H5") {
                        window.open(this.http + "/index/apply/mph5?applyid=" + res.data.applyid);
                        setapplyid(res.data.applyid);
                      } else {
                        setapplyid(res.data.applyid);
                        mpo({
                          applyid: res.data.applyid,
                          openid: this.openid,
                        }).then((resp) => {
                          if (resp.code == 200) {
                            WeixinJSBridge.invoke("getBrandWCPayRequest", resp.data, (res) => {
                              if (res.err_msg == "get_brand_wcpay_request:ok") {
                                this.$toast.success("支付成功");
                                location.reload();
                              } else {
                                delapplyid();
                                this.$toast.fail("支付失败");
                              }
                            });
                          } else {
                            delapplyid();
                            this.$toast.fail(resp.msg);
                          }
                        });
                      }
                      done();
                    } else {
                      done();
                    }
                  },
                })
                .then(() => {
                  // this.$router.push('/')
                  // this.$toast.success('缴费成功')
                })
                .catch(() => {});
            } else {
              this.$dialog
                .confirm({
                  title: "提示",
                  message: "报名成功，管理员审核成功后即可开通培训权限",
                })
                .then(() => {
                  this.$router.push("/");
                })
                .catch(() => {});
            }
          } else {
            this.$dialog
              .confirm({
                title: "提示",
                message:
                  this.platform("hzdpx") || this.platform("xtaq") || (this.platform("zcaq") && formLabelAlign.gz == "大培训")
                    ? "报名成功,点击确定跳转至登陆界面"
                    : "报名成功，管理员审核成功后即可开通培训权限",
              })
              .then(() => {
                if (this.platform("hzdpx") || this.platform("xtaq") || (this.platform("zcaq") && formLabelAlign.gz == "大培训")) {
                  window.open(this.http + "/user/#/wxlogin?username=" + formLabelAlign.username, "_self");
                } else {
                  this.$router.push("/");
                }
              })
              .catch(() => {});
          }
        } else if (res.msg == "已经报过名了") {
          if (this.isJf && this.http.indexOf("//haoxue.taijieyun")!=-1) {
            // this.$refs.jf.open()
            let applyid = res.err.applyid;
            this.loading = true;
            getapplyInfor({
              username: formLabelAlign.username,
              subject_id: formLabelAlign.subject_id,
            }).then((res) => {
              if (res.code == 200) {
                if (res.data.length == 0) {
                  this.loading = false;
                  this.$dialog.confirm({
                    title: "提示",
                    message:"您已经报名并缴费，请到学员端登录学习", 
                    confirmButtonText: "去登录",
                    cancelButtonText: "取消",
                    showClose: false,
                    beforeClose: (action, done) => {
                      if (action == "confirm") {
                        window.open(this.http + "/user", "_self");
                      }
                      done();
                    },
                  });
                } else {
                  this.loading = false;
                  this.$dialog.confirm({
                    title: "提示",
                    message: "该身份证号的该培训科目已报名未缴费，是否现在缴费",
                    confirmButtonText: "去缴费",
                    cancelButtonText: "取消",
                    showClose: false,
                    beforeClose: (action, done) => {
                      if (action == "confirm") {
                        this.$refs.jf.submit(formLabelAlign.username, applyid);
                      }
                      done();
                    },
                  });
                  return;
                }
              }
            });
          } else {
            this.$toast.fail(res.msg);
          }
        } else {
          this.$toast.fail(res.msg);
        }
      });
    },
    lazyLoad(node, resolve) {
      let id = node.data ? node.data.region_id : 0;
      regionList({ region_pid: id }).then((res) => {
        resolve(res.data.list);
      });
    },
    //确定
    onConfirm(val) {
      this.formLabelAlign.gz = val;
      let str = val;
      if (this.platform("yali")) {
        if (val == "危化品") {
          str = "安全管理";
        }
        if (val == "一般行业") {
          str = "一般工贸";
        }
      }
      if (this.platform("dkaq")) {
        if (val == "高危安管") {
          str = "安全管理";
        }
      }
      this.showPicker = false;
      this.gzChange(str);
    },
    //确定
    InputConfirm(val) {
      this.formLabelAlign[this.formLabelAlign.isShow] = val;
      this.showCascader = false;
      this.Arrpass.map((item) => {
        if (item.field_id == this.formLabelAlign.isShow) {
          item.placeholder = val;
        }
      });
    },
    //确定
    pickConfirm(val) {
      console.log(val, "11");
      this.Arrpass.map((item) => {
        let date = new Date(val);
        let LYJC_TIME = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
        if (item.field_id == this.formLabelAlign.isShow) {
          item.placeholder = LYJC_TIME;
        }
        switch (this.formLabelAlign.isShow) {
          case "学历结束时间":
            this.xueli_endtime = LYJC_TIME;
            break;
          case "学历开始时间":
            this.xueli_starttime = LYJC_TIME;
            break;
          case "工作开始时间":
            this.work_starttime = LYJC_TIME;

            break;
          case "工作结束时间":
            this.work_endtime = '至今';
            break;
          case "qzsj":
            this.formLabelAlign.qzsj = LYJC_TIME;
            break;
        }

        if (this.formLabelAlign.isShow == "学历结束时间") {
        } else {
        }

        if (item.label == "学习工作经历") {
          let date = new Date(val);
          if (this.formLabelAlign.isShow == "工作结束时间") {
          } else {
          }
        }
      });

      this.showCascader = false;
    },
    vanClick(root, time) {
      console.log(123);
      const { field_type, field_id, options, label } = root;
      this.formLabelAlign.isShow = field_id;
      if (label == "学历起止时间") {
        if (time == "start") {
          this.formLabelAlign.isShow = "学历开始时间";
        }
        if (time == "end") {
          this.formLabelAlign.isShow = "学历结束时间";
        }
        this.showCascader = true;
      }
      if (label == "取证时间") {
        this.showCascader = true;
      }
      if (label == "学习工作经历" && this.formLabelAlign.gz == "特种作业") {
        if (time == "workstart") {
          this.formLabelAlign.isShow = "工作开始时间";
        }
        if (time == "workend") {
          this.formLabelAlign.isShow = "工作结束时间";
        }

        this.showCascader = true;
      }

      let list = options ? JSON.parse(options) : [];
      this.formLabelAlign.options = [];
      list.map((item) => {
        this.formLabelAlign.options.push(item.e);
      });
      if (field_type == "select") {
        this.showCascader = true;
        if (field_id == "region_id") {
          regionList({ region_pid: 0 }).then((res) => {
            this.pakeHotl = res.data.list;
          });
        }
      } else {
        return true;
      }
    },
    //联机选择
    onFinish({ selectedOptions }) {
      this.showCascader = false;
      // this.formLabelAlign[this.formLabelAlign.isShow] = selectedOptions.map((option) => option.title).join('/')
      // this.Cascadervalue = selectedOptions.map((option) => option.title).join('/')

      this.Arrpass.map((item) => {
        if (item.field_id == this.formLabelAlign.isShow) {
          item.placeholder = selectedOptions.map((option) => option.title).join("/");
          // this.formLabelAlign[this.formLabelAlign.isShow] = selectedOptions.map((option) => option.id).join(',')
        }
      });
    },
    //工作地点
    HotFinish({ selectedOptions }) {
      this.showCascader = false;
      // this.formLabelAlign[this.formLabelAlign.isShow] = selectedOptions.map((option) => option.title).join('/')
      // this.Cascadervalue = selectedOptions.map((option) => option.title).join('/')
      this.Arrpass.map((item) => {
        if (item.field_id == this.formLabelAlign.isShow) {
          item.placeholder = selectedOptions.map((option) => option.region_name).join("/");
          this.formLabelAlign[this.formLabelAlign.isShow] = selectedOptions.map((option) => option.region_id).join(",");
        }
      });
    },
    depFinish({ selectedOptions }){
      this.showdepbox=false
      this.deptitle = selectedOptions.map((option) => option.title).join('/')
      this.formLabelAlign['dep'] = selectedOptions.map((option) => option.id)[selectedOptions.map((option) => option.id).length-1];
      this.formLabelAlign['depid'] = selectedOptions.map((option) => option.id)[selectedOptions.map((option) => option.id).length-1];
    },
    //
    downloadImg2(name) {
      // if (this.formLabelAlign.gz == "特种作业") {
      //   window.open("https://dkaq.taijieyun.com/storage/userimage/dkaq/20221114/983a84f2eeccb07ac44bfdea89ee2571.doc");
      // }
      // if (this.formLabelAlign.gz == "一般工贸" || this.formLabelAlign.gz == "安全管理") {
      //   window.open("https://dkaq.taijieyun.com/storage/userimage/dkaq/20221114/6182ba9e60c9500b76c52c3f42fca0d9.doc");
      // }
      if(this.platformAnhui()&&this.platformAnhui().length!=0){
        this.platformAnhui().forEach(item=>{
          if(item.gz.includes(this.formLabelAlign.gz)&&item.name==name){
            downloadAll(item.filePath, item.name);
          }
        })
      }
      if(this.platform('xinhua')){
        window.open("https://xinhua.taijieyun.com/storage/userimage/xinhua/20221227/0aeedb419f2afbb56415242c6dfd8505.docx");
      }
    },
    downloadImg3() {
      if (this.formLabelAlign.gz == "一般工贸" || this.formLabelAlign.gz == "安全管理") {
        window.open("https://dkaq.taijieyun.com/storage/userimage/dkaq/20221114/fdf8c2f000a3becdbf5ca52495aa44dd.docx");
      }
    },
    //打开签名
    writeName(name, id) {
      // this.$refs.autograph.clear();
      if (name == "jkcns") {
        if (!this.formLabelAlign.nickname) {
          return this.$toast.fail("姓名不能为空");
        }
        if (!this.formLabelAlign.username) {
          return this.$toast.fail("身份证号不能为空");
        }
        if (!this.subjectTitle) {
          return this.$toast.fail("请选择培训科目后再签名");
        }
      }
      if (name == "education" && !this.formLabelAlign.education) {
        return this.$toast.fail("请选择学历后再签名");
      }
      this.fileNameWirth = name;
      this.DOMID = id;
      this.dialogShow = true;
      this.$refs.autograph.clear()
    },
    //阿克苏提交签名
    submitAks(file) {
      if (file) {
        this.DOMID = "DomImgjkcns";
        let that = this;
        let reader = new FileReader();
        reader.readAsDataURL(file.raw);
        reader.onload = (e) => {
          console.log(e.target);
          this.autographPath = e.target.result;
          upFileqm(this.autographPath, this.formLabelAlign.nickname, {
            field: "signature",
          }).then((res) => {
            if (res.code == 200) {
              this.formLabelAlign.signature = res.data.url;
            }
          });
          setTimeout(() => {
            upFile(this.formLabelAlign.nickname + "jkcns", { field: "jkcns" }, this.DOMID).then((res) => {
              if (res.code == 200) {
                this.$message.success("提交成功");
                // this.autographPath = res.data.url
                this.formLabelAlign.jkcns = res.data.url;
                this.dialogShow = false;
              } else {
                this.$message.error("签名失败");
              }
            });
          }, 200);
        };
      }
    },
    //提交签名图片
    async submit(action, done) {
      // dialogShow = false
      // return new Promise((resolve) => {
      //     console.log(1111111)
      //
      // });
      if (action === "confirm") {
        this.autographPath = this.$refs.autograph.commit();
        if (this.DOMID == "DomImgzjbl") {
          this.autographPath2 = this.$refs.autograph.commit();
        } else if (this.DOMID == "DomImgXL") {
          this.autographPath3 = this.$refs.autograph.commit();
        } else if (this.DOMID == "DomImgjkcns") {
          this.autographPath1 = this.$refs.autograph.commit();
          console.log(this.autographPath1);
        }
        if (!this.DOMID) {
          if(this.fileNameWirth=='注意事项'){
            this.autographPath4 = this.$refs.autograph.commit(); //注意事项
          }
          if(this.fileNameWirth=='cxsm'){
            this.autographPath5 = this.$refs.autograph.commit(); //注意事项
          }else
          if(this.fileNameWirth=='cnsx'){
            this.autographPath6 = this.$refs.autograph.commit(); //注意事项
          }else
          if(this.fileNameWirth=='zqtys'){
            this.autographPath7 = this.$refs.autograph.commit(); //注意事项
          }
          else if(this.fileNameWirth=='cnx'){
            this.autographPath8 = this.$refs.autograph.commit(); //注意事项
          }
        }
        await upFileqm(this.autographPath, this.formLabelAlign.nickname, {
          field: "signature",
        }).then((res) => {
          if (res.code == 200) {
            this.formLabelAlign.signature = res.data.url;
            if (this.platformAnhui()) {
              this.formLabelAlign.extra[this.fileNameWirth] = res.data.url;
              if(this.DOMID){
                this.formLabelAlign[this.fileNameWirth] = res.data.url;
              }
              this.$toast.success("提交成功");
              done();
            }
            if(this.fileNameWirth=='cxsm'||this.fileNameWirth=='cnsx'||this.fileNameWirth=='zqtys'||this.fileNameWirth=='cnx'){
              this.formLabelAlign.extra[this.fileNameWirth] = res.data.url;
              this.$toast.success("提交成功");
              done();
            }
          } else {
            this.$toast.fail(res.msg || "签名储存失败，请联系管理员");
          }
        });
        if (!this.platformAnhui()&&this.fileNameWirth!='cxsm'&&this.fileNameWirth!='cnsx'&&this.fileNameWirth!='zqtys'&&this.fileNameWirth!='cnx') {
          setTimeout(() => {
            upFile(this.formLabelAlign.nickname + this.fileNameWirth, { field: this.fileNameWirth }, this.DOMID).then((res) => {
              if (res.code == 200) {
                this.$toast.success("提交签名成功");
                this.formLabelAlign[this.fileNameWirth] = res.data.url;
                done();
              } else {
                this.$toast.fail(res.msg || "签名失败");
              }
            }).catch((err)=>{
              this.$toast.fail("存储状态异常,请重试!");
              done();
            })
          }, 500);
        }
      } else {
        done();
      }
    },
    //通用弹出提醒
    openBookalert(text,title) {
      //  this.DomImgShow=true  formLabelAlign
      if(!this.subjectTitle&&text=='cxsm'){
        return this.$message.error("请选择培训科目不能为空");
      }
      var msg = ''
      if(text=='cxsm'){
        msg = `本人符合(${this.formLabelAlign.gz=='特种作业'?'特种作业人员':this.subjectTitleList[0]})安全生产知识和管理能力考核合格证考试条件，在表中填写的个人信息和提供的身份证明等内容是真实的(本人提供的身份证明等内容由培训机构留存)`
      }
      if(text=='cnsx'){
        msg = `1.本人身体健康，无妨碍从事相应特种作业的器质性心脏病、癫痫病、美尼尔氏症、
                眩晕症、癔病、震颤麻痹症、精神病、痴呆症以及其他疾病和生理缺陷；2.以上所填写的
                本人信息及提供的身份证复印件、学历证书复印件等材料真实有效；3.本人按《特种作业
                人员安全技术培训考核管理规定》（国家安全监管总局令第30号）有关规定参加相应的
                安全技术理论培训和实际操作培训4.以上个人信息和承诺事项以及提供的有关材料，如
                有弄虚作假或欺骗等行为，自愿被依法撤销《中华人民共和国特种作业操作证》，3年内
                不再申请办证。`
      }
      if(text=='cnx'){
        msg = `本人承诺，以上填写的个人信息和提供的身份证复印件、学历证书复印件及个人健康承诺书内容真实。`
      }
      if(this.platform('kaiqi')&&text=='zqtys'){
        ImagePreview([require('../../components/img/kaiqi/1.png'),require('../../components/img/kaiqi/2.png')]);
        return
      }
      if(this.platform('mingda')&&text=='zqtys'){
        ImagePreview([require('../../components/img/mingda/1.png')]);
        return
      }
      this.$dialog
        .alert({
          title: title,
          message:msg,
        })
        .then(() => {});
    },
    //打开承诺书
    openBook() {
      this.$dialog
        .alert({
          title: "健康承诺书",
          message:
            "本人身体健康，无妨碍从事相应特种作业的器质性心脏病、癫痫病、美尼尔氏症、眩晕症、癔病、震颤麻痹症、精神病、痴呆症以及其他疾病和生理缺陷。本人对以上信息的真实性负责，如有隐瞒，相关责任全部由本人承担。",
        })
        .then(() => {});
    },
    //注意事项
    openBookshixiang() {
      this.$dialog
        .alert({
          title: "注意事项",
          message:
            "1.报名成功后，一个月以内，扣费100元！（包含视频学习卡，材料费，照片费，人工服务费）一个月以后一律不退费！ 2.理论实操各二次机会，二次不合格，重新报名！ 3.报名开始计算一年内有效，一年内不考，重新报名！（如遇不可抗拒因素，适当延期） 4.报考学员，必须完成各工种培训大纲学时，理论线上视频课程，不完成一律不安排考试，实操线下培训，必须参加。如遇缺课，漏签，代签，不完成一律不安排考试，培训结束后，会收到短信通知，学员自行缴纳考试费，初训（理论考试费50元，实操考试费110元），复训（理论考试费50元）学员延迟缴费，出现上诉以上问题，不能考试，学员自行承担后果！ 5.本校只提供开局培训费发票，考试费发票学员自行打印，（考试费需要报销学员，考试注册时候一定要填写正确的企业名称） 6. 一般工贸和危化经营生产主要负责人，管理员不用缴纳考试费  7.报考人员年龄限制18岁-60岁",
        })
        .then(() => {});
    },
    //证件办理费用协议
    openBookXY() {
      //  this.DomImgShow=true
      this.$dialog
        .alert({
          title: "证件办理费用协议",
          message:
            "一、甲方依据相关规定收取乙方培训、考试、办理及发放证件等费用，并依法对乙方提供相关服务。二、乙方必须按甲方规定时间进行培训、考试及取证，因乙方个人原因及行为不能按时参加培训、考试及无法取证者，甲方不予退费。三、从报名开始，六个月之内必须考完，否则视为自动放弃。四、代办人员需将本协议告知学员本人。",
        })
        .then(() => {});
    },
    //打开学历承诺书  education
    openBookXl() {
      if (!this.formLabelAlign.education) {
        return this.$toast.fail("请选择您的学历!");
      }
      this.$dialog
        .alert({
          title: "学历承诺书",
          message: `我承诺：本人具有${this.formLabelAlign.education}学历，以上内容真实有效，如有虚假，本人愿意承担相应责任`,
        })
        .then(() => {});
    },
    //示例图片
    openDefimg(path) {
      this.$dialog
        .alert({
          title: "示例图片",
          message: `<div style="display: flex;justify-content: center;align-items: center;background:#eee;"><img src="${path}" style="height:313px;width:206.5px;" alt="示例图片"></div>`,
          allowHtml: true,
        })
        .then(() => {});
    },
    //下载学历承诺书
    downReader() {
      let MicroMessenger = navigator.userAgent.match(/MicroMessenger/i);
      if (MicroMessenger) {
        this.TCshow = true;
        this.downloadURL = "https://lyky.taijieyun.com/template/lyky/%E5%AD%A6%E5%8E%86%E6%89%BF%E8%AF%BA%E4%B9%A6.docx";
      } else {
        download("https://lyky.taijieyun.com/template/lyky/%E5%AD%A6%E5%8E%86%E6%89%BF%E8%AF%BA%E4%B9%A6.docx", "学历承诺书.docx");
      }
    },
    //下载健康查体表
    downFuled() {
      let MicroMessenger = navigator.userAgent.match(/MicroMessenger/i);
      if (MicroMessenger) {
        this.TCshow = true;
        this.downloadURL = "https://lyky.taijieyun.com/template/lyky/%E4%BD%93%E6%A3%80%E8%A1%A8.doc";
      } else {
        download("https://lyky.taijieyun.com/template/lyky/%E4%BD%93%E6%A3%80%E8%A1%A8.doc", "健康查体表.doc");
      }
      // window.open('https://lyky.taijieyun.com/template/lyky/%E4%BD%93%E6%A3%80%E8%A1%A8.doc')
      // download('https://lyky.taijieyun.com/template/lyky/%E4%BD%93%E6%A3%80%E8%A1%A8.doc','健康查体表.doc')
    },
    copy() {
      let url = this.downloadURL;
      let oInput = document.createElement("input");
      oInput.value = url;
      document.body.appendChild(oInput);
      oInput.select(); // 选择对象;
      document.execCommand("Copy"); // 执行浏览器复制命令
      this.$toast.success("复制成功");
      oInput.remove();
    },
    //太化 提交
    commitA() {
      if (this.$refs.taihua.commit()) {
        let objA = this.$refs.taihua.commit()[0];
        let objB = this.$refs.taihua.commit()[1];
        this.loading = true;
        applyAdd({ ...objA, extra: JSON.stringify(objB) }).then((res) => {
          this.loading = false;
          if (res.code == 200) {
            this.$confirm("报名成功，管理员审核成功后即可开通培训权限", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "success",
              showClose: false,
            })
              .then(() => {
                this.$router.push("/");
              })
              .catch(() => {});
          } else {
            this.$message.error(res.msg);
          }
        });
      }
    },

    //打开相机
    openCorme(item){
      this.setOptions = {
        style:{
        },
        clip:1.58,
        msgs:[
          '1. 请拍摄或在相册中选择证件图片',
          '2. 证件信息必须无遮挡且清晰不模糊。',
          '3. 照片请勿上下、左右倒置或翻转；'
        ],
        field_id:item.field_id
      }
      if(item.field_id=='photo'){
        delete this.setOptions.clip
        this.setOptions.style={
          width:225,
          height:300,
        }
      }
      if(item.field_id=='id_card_photo'){
        this.setOptions = {
          style:{
          },
          clip:1.58,
          field_id:item.field_id,
          msgs:[
            '1. 请拍摄或在相册中选择证件图片',
            '2. 证件信息必须无遮挡且清晰不模糊。',
            '3. 照片请勿上下、左右倒置或翻转；'
          ],
        }
      }
      if(item.field_id=='id_card_emblem'){
        this.setOptions = {
          style:{
          },
          clip:1.58,
          field_id:item.field_id,
          msgs:[
            '1. 请拍摄或在相册中选择证件图片',
            '2. 证件信息必须无遮挡且清晰不模糊。',
            '3. 照片请勿上下、左右倒置或翻转；'
          ],
        }
      }
      if(item.field_id=='edu_photo'||item.field_id=='hukou_photo'||item.field_id=='yyzz'||item.field_id=='zyzgz'||item.field_id=='healthy_img'||item.field_id=='trip_img'||item.field_id=='test_img'||item.field_id=='training_record'){
        this.setOptions = {
          style:{
          },
          clip:1.2,
          field_id:item.field_id,
          msgs:[
            '1. 请拍摄或在相册中选择证件图片',
            '2. 证件信息必须无遮挡且清晰不模糊。',
            '3. 照片请勿上下、左右倒置或翻转；'
          ],
        }
      }
      this.showcamera=true
    },

    //拍照图片储存
    imgurl({url,field_id}){
      //url   64
      let file = dataURLtoFile(url);
      // console.log(file);  id_card_photo
      if (this.$refs['img'+field_id][0]) {
        upFileqm(url, '1', {
          field: field_id,
        }).then((res) => {
          if (res.code == 200) {
            this.fromList.map(item=>{
              if (item.field_id == field_id) {
                item.fileList= [{
                  url: res.data.url,
                  name: "1",
                }]
              }
              
            })
            this.formLabelAlign[res.data.field] = res.data.url;
            if(res.data.field=='last_cert'){
              this.formLabelAlign[res.data.field] = JSON.stringify([res.data.url]);
            }
            this.$forceUpdate()
            this.$toast.success("提交成功");
          }
        });
        // this.$refs['imgid_card_photo'][0].uploadImg(file);
      }
      if(field_id == 'id_card_photo'&&this.photoApply){
        this.loading=true
        const formData = new FormData()
        formData.append('image',file)
        aliasOCR(formData).then(res=>{
          this.loading=false
          if(res.code==200&&res.data.success){
            // this.$emit('info', res.data)
            this.Arrpass.map(item=>{
              if (item.field_id == 'username') {
                item.placeholder = res.data.num //身份证号
                this.formLabelAlign['username'] = res.data.num
              }
              if (item.field_id == 'nickname') {
                item.placeholder = res.data.name //名字
                this.formLabelAlign['nickname'] = res.data.name
              }
              if (item.field_id == 'gender') {
                item.placeholder = res.data.sex //性别
                this.formLabelAlign['gender'] = res.data.sex
              }
              // if (item.field_id == 'username') {
              //   item.placeholder = data.num //身份证号
              // }
            })
          }else{
            this.$toast.fail("图片格式不支持或图片内容不是身份证");
            this.remove(field_id)
            // this.$emit('error', res.data)
          }
        })
      }
    },
    //获取识别图片
    chengePhoto(data){
      
    },
    //图片背景色更改
    PictureEditBack(item, file){
      this.showProBack=true
      this.backPhoto=file.url
    },
    //修改背景图片
    checkBackGround(col){
      this.showProBackLoading=true
      if(this.platform("sjhg")||this.platform('qiye')){
        photoMake({
          url:this.formLabelAlign.photo,
          bk:'#ffffff',
          spec:1, //一寸 1 二寸 4
        }).then(res=>{
          this.showProBackLoading=false
          if(res.code==200){
            this.backPhoto = res.data.result
            let url = res.data.result
            if(process.env.NODE_ENV === 'development'){
              url = '/photoMake'+res.data.result.split('https://oapi.aisegment.com')[1]
            }else{
              url = res.data.result
            }
            fetch(url,{
              mode:'no-cors'
            })
            .then((res) => {
                return res.blob();
            }).then(blob=>{
              this.backPhotoFile = new File([blob], 'photo.png', { type: "image/jpeg" });
              console.log(this.backPhotoFile);
            }).catch(err=>{
            })
          }
        })
      }else{
        axios(
          '/taof',
          'get',
          {
            url:this.formLabelAlign.photo,
            col
          }
        ).then(res=>{
          this.showProBackLoading=false
          if(res.data.code==200){
            this.backPhoto = res.data.url
            let url = res.data.url
            if(process.env.NODE_ENV === 'development'){
              url = '/urlapi'+res.data.url.split('https://cache.wer.plus')[1]
            }else{
              url = res.data.url
            }
            fetch(url,{
              mode:'no-cors'
            })
            .then((res) => {
                return res.blob();
            }).then(blob=>{
              this.backPhotoFile = new File([blob], 'photo.png', { type: "image/jpeg" });
            }).catch(err=>{
            })
          }else{
            this.$message.error(res.data.msg)
          }
        })
      }
    },
    commitEditPhtot(){
      this.showProBack = false
      // if (this.$refs['imgphoto'][0]) {
      //   this.$refs['imgphoto'][0].uploadImg(this.backPhotoFile);
      // } else {
      //   this.$refs['imgphoto'].uploadImg(this.backPhotoFile);
      // }
      // this.fromList.map(item=>{
      //   if(item.field_id=='photo'){
      //     item.fileList=[
      //       {
      //         url: this.backPhoto,
      //         name: "",
      //       },
      //     ]
      //   }
      // })
      upFileqm(this.backPhoto, '1', {
          field: 'photo',
        }).then((res) => {
          if (res.code == 200) {
            this.formLabelAlign.signature = res.data.url;
            this.fromList.map(item=>{
              if (item.field_id == 'photo') {
                item.fileList= [{
                  url: res.data.url,
                  name: "1",
                }]
              }
              
            })
            this.formLabelAlign[res.data.field] = res.data.url;
            if(res.data.field=='last_cert'){
              this.formLabelAlign[res.data.field] = JSON.stringify([res.data.url]);
            }
            this.$forceUpdate()
            this.$toast.success("提交成功");
          }
        });
    },
  },
 
};
</script>
<style lang="scss">
.crop-component .crop-around:after{
  background: none !important;
  content: '旋转' !important;
  width: 30px !important;
  height: 20px !important;
  color: #fff !important;
}
.crop-component .crop-close:after{
  background: none !important;
  content: '关闭' !important;
  width: 30px !important;
  height: 20px !important;
  color: #fff !important;
}
.crop-component .crop-reset:after{
  background: none !important;
  content: '重置' !important;
  width: 30px !important;
  height: 20px !important;
  color: #fff !important;
}
.crop-component .crop-btn:after{
  background: none !important;
  content: '裁剪' !important;
  width: 30px !important;
  height: 20px !important;
  color: #fff !important;
}
</style>
<style lang="scss" scoped>
.root {
  position: relative;
  overflow: hidden;
  background: #eee;
}

.background {
  height: 100vh;
  width: 100vw;
  padding: 1.7vh 3.2vw;
  background: url("~@/assets/mobile/bg.jpg") no-repeat;
  background-size: 100%;

  .text {
    width: 100%;
    padding: 5.3vh 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: #fff;
    font-weight: 600;
    position: relative;

    i {
      position: absolute;
      left: 3%;
      top: 10%;
      font-size: 1rem;
    }

    .button {
      position: absolute;
      right: 3%;
      top: 5%;
      // font-size: 1rem;
      padding: 10px;
      background: #f78109;
      border: #f78109;
    }
  }

  .content {
    width: 100%;
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.7vh 3.2vw;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.7vh;
    height: calc(100vh - 10.6vh - 1.125rem - 3.4vh);
    overflow: auto;

    .box_form_title {
      text-align: center;
    }
  }
}

::v-deep {
  .el-form-item__content {
    line-height: 16px !important;
    margin-left: 0 !important;
  }
  
  .lablesClass {
    width: 100%;
    font-size: 1rem;
  }
  .van-picker__toolbar{
    button{
      font-size: 16px !important;
    }
  }
  .van-picker-column{
    font-size: 18px;
    // li{
    //   height: 50px !important;
    // }
  }
  // .van-picker__frame{
  //   height: 50px !important;
  // }
  .van-tab{
    font-size: 16px;
  }
  .van-cascader__options {
    height: calc(100%);
  }
  .van-cascader__option{
    font-size: 18px;
  }
  .vant {
    font-size: 1rem !important;

    &::after {
      position: absolute;
      box-sizing: border-box;
      content: " ";
      pointer-events: none;
      right: 16px;
      bottom: 0;
      left: 16px;
      border-bottom: 1px solid #ccc;
      -webkit-transform: scaleY(0.5);
      transform: scaleY(0.5);
    }
  }
  .van-tabs {
    height: calc(100% - 48px);
    .van-tabs__content {
      height: calc(100% - 48px);

      .van-tab__pane {
        height: 100%;
      }
    }
  }
  .van-cell {
    font-size: 1rem !important;
    display: flex;
    flex-direction: column;
    position: relative;
    &::after {
      // position: absolute;
      // box-sizing: border-box;
      // content: " ";
      // pointer-events: none;
      // right: 16px;
      // bottom: 0;
      // left: 16px;
      // border-bottom: 1px solid #ccc;
      // -webkit-transform: scaleY(0.5);
      // transform: scaleY(0.5);
      height: 0;
    }
    .van-cell__value{
      margin-top: 8px;
      padding: 8px 12px;
      background: #F5F5F5;
    }
    .van-icon{
      position: absolute;
      right: 30px;
      bottom: 18px;
      transform: rotate(90deg);
      // display: none;
    }
  }

  .el-form-item__label {
    font-size: 1rem !important;
  }
  .el-form-item {
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
    padding:8px 12px;
  }
  .catie {
    .van-cell__value {
      
      margin-top: 30px !important;
    }

    .van-cell {
      .van-icon {
        margin-top: 30px !important;
      }
    }
  }
  .tipTextarea{
    textarea{
      overflow: hidden;
      border: none !important;
    }
  }
}

.DomImg {
  position: absolute;
  z-index: -5;

  .A4page {
    width: calc(595px * 2);
    height: calc(840px * 2);
    // background:url('~@/assets/logo/pdfbg.png') no-repeat;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    color: #000;
    position: relative;
    padding: 150px 150px;

    u {
      // text-decoration:underline;
      border-bottom: 1px solid #333;
      // display: inline-block;
      // padding:0 80px;
    }

    p {
      margin: 0;
      font-size: 30px;
      line-height: 80px;
      
    }

    h1 {
      text-align: center;
      // font-weight: 600;
      font-size: 40px;
    }
  }
}

#DomImgzjbl {
  top: 0;

  // z-index: 5;
  .A4page {
    padding: 50px 150px;

    p {
      line-height: 60px;
    }
  }
}
</style>
